// 所有和【用户等级】相关的请求

import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http"

export type GradeItemType = {
    _id?: string,
    is_show: number,
    name: string,
    grade: string,
    discount: string,
    exp: string,
    icon?: string,
    bg_image?: string
}

// 获取用户等级数据
export const findUserGradeApi = (data?: object) => {
    return httpPost('/userGrade/find', data)
}
// 添加用户等级数据
export const addUserGradeApi = (data: object) => {
    return httpPost('/userGrade/add', data)
}
// 删除用户等级数据
export const deleteUserGradeApi = (data: object) => {
    return httpDelete('/userGrade/remove', data)
}
// 修改用户等级数据
export const updateUserGradeApi = (data: object) => {
    return httpPut('/userGrade/update', data)
}
// 获取一个用户等级数据的详情
export const getUserGradeByIdApi = (data: object) => {
    return httpGet('/userGrade/getById', data)
}